package com.wongoing.util;

public enum Status {
	SUCCESS(0,"SUCCESS","请求成功"),
	ERROR(1,"FAIL","请求错误"),
	OK(200,"OK","请求成功"),
	MULTIPLE_CHOICES(300,"Multiple Choices","多重选择"),
	BAD_REQUEST(400,"Bad Request","请求错误"),
	INTERNAL_SERVER_ERROR(500,"Internal Server Error","服务器错误"),
	//自定义错误使用负数定义，可在action或接口中使用-2、-3定义，以此类推
	ERROR_MSG_BY_SELF(-1,"Error message by yourself!","自定义错误！"),
	
	USERNAME_IS_NULL(2,"Username is null!","用户名为空!"),
	PASSWORD_IS_NULL(2,"Password is null!","密码为空!"),
	SMS_CODE_IS_NULL(2,"Sms code is null!","短信验证码为空!"),
	MESSAGE_ID_IS_NULL(2,"Message id is null!","message id 为空!"),
	CUSTOMERNAME_IS_NULL(2,"CustomerName is null!","用户姓名为空!"),
	LOGIN_IS_EXIST(3,"Login is exist!","该用户已登录!"),
	UNKNOWN_SESSION_EXCEPTION(4,"Unkonwn session exception","异常会话!"),
	UNKNOWN_ACCOUNT_EXCEPTION(5,"Unknown account exception","账号错误!"),
	INCORRECT_CREDENTIALS_EXCEPTION(6,"Incorrect credentials exception","密码错误!"),
	LOCKED_ACCOUNT_EXCEPTION(7,"Locked account exception","账号已被锁定，请与系统管理员联系!"),
	INCORRECT_CAPTCHA_EXCEPTION(8,"Incorrect captcha exception","验证码错误!"),
	AUTHENTICATION_EXCEPTION(9,"Authentication exception", "您没有授权!"),
	UNKNOWN_EXCEPTION(10,"Unknown exception","出现未知异常,请与系统管理员联系!"),
	UNKNOWN_EXCEPTION_TO_RESET(11,"unknown exception, please login again","出现未知异常,请重新尝试或重新登录后尝试!"),
	SIGN_IN_EXCEPTION(12,"Account already logined","账号已登录，请误重复登录!"),
	SIGN_IN_ABNORMAL(13,"Unknown account exception, please login again","账户登录异常"),
	SIGN_NO(14,"Your account is not logged in or logged in timeout", "您的账户未登录或已登录超时，为了您的账户安全，请重新登录!"),
	UNKNOWN_DATA_EXCEPTION(15,"Unknown data exception!","数据获取错误！"),
	GET_DATA_SUCCESS(16,"Success to get your data!","数据获取成功！"),
	INTERFACE_ACCESS_SUCCESSFUl(17,"Interface access successful!","接口访问成功！"),
	INTERFACE_ACCESS_FAILURE(18,"Interface access failure!","接口访问失败！"),
	OTHER_SYSTEM_IS_LOGIN(19,"Other system is logined","您的账户已在其他系统登录，请先注销后再登录该系统！"),
	PASSWORD_RESET_OK(20,"Password updated ok!","密码修改成功！"),
	OLD_PASSWORD_WRONG(21,"Old password is wrong!","您输入的旧密码错误，请重新输入！"),
	SERVE_NUMBER_WRONG(22,"Input serve number is wrong!","输入的服务号码无效，请重新输入！");
	private Status(Integer code, String descriptionEn, String descriptionZh) {
		this.code = code;
		this.descriptionEn = descriptionEn;
		this.descriptionZh = descriptionZh;
	}
	
	private Integer code;
	private String descriptionEn;
	private String descriptionZh;
	
	public Integer getCode() {
		return code;
	}
	public String getDescriptionEn() {
		return descriptionEn;
	}
	public String getDescriptionZh() {
		return descriptionZh;
	}
	public String toString() {
		return this.descriptionZh;
	}
}
